<?php

namespace Phones\MainBundle\Controller;

class DefaultController extends AppController {
    
    public function indexAction($page = 1) {
        $itemsPerPage = 9;
        list($models, $total) = $this->getEntity('Model')
                                         ->all($page, $itemsPerPage);

        return $this->render(null, compact('models', 'total', 'itemsPerPage', 'page'));
    }
        
}
